package com.xxl.job.sscIntegrInfo.service.impl;

import com.xxl.job.sscIntegrInfo.domain.SscIntegrInfo;
import com.xxl.job.sscIntegrInfo.domain.SscIntegrInfoVo;
import com.xxl.job.sscIntegrInfo.mapper.SscIntegrInfoMapper;
import com.xxl.job.sscIntegrInfo.service.ISscIntegrInfoService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 积分明细Service业务层处理
 *
 * @author zyc
 * @date 2023-08-22
 */
@Service
public class SscIntegrInfoServiceImpl implements ISscIntegrInfoService {

    @Autowired
    private SscIntegrInfoMapper sscIntegrInfoMapper;

    /**
     * 查询积分明细
     *
     * @param integrInfoId 积分明细主键
     * @return 积分明细
     */
    @Override
    public SscIntegrInfoVo selectIntegralInfoById(Long integrInfoId) {
        return sscIntegrInfoMapper.selectIntegralInfoById(integrInfoId);
    }

    /**
     * 查询积分明细列表
     *
     * @param sscIntegrInfo 积分明细
     * @return 积分明细
     */
    @Override
    public List<SscIntegrInfoVo> selectIntegralInfoList(SscIntegrInfo sscIntegrInfo) {
        return sscIntegrInfoMapper.selectIntegralInfoList(sscIntegrInfo);
    }

    /**
     * 积分未领取失效后把积分状态更新为已失效
     *
     * @return: int
     * @author: zyc
     * @date: 2023/8/29 16:47
     */
    @Override
    public int updateInlLoseEfficacy() {
        return sscIntegrInfoMapper.updateInlLoseEfficacy();
    }

    /**
     * 查询积分临期信息
     *
     * @param integralInfoVo
     * @return: List
     * @author: zyc
     * @date: 2023/8/29 17:52
     */
    @Override
    public List<SscIntegrInfoVo> selectIntegralAdventList(SscIntegrInfoVo integralInfoVo) {
        return sscIntegrInfoMapper.selectIntegralAdventList(integralInfoVo);
    }
}
